package hashstudy;


public class Main {
    public static void main(String[] args) {
        /*//为什么前面要加变量类型声明，后面就可以不用  （具体怎么声明
        HashMap<String,String> map = new HashMap<>();
        map.put("zhangsan","123");*/
        Map<String, String> map = new HashMap<>();
        map.put("zhangsan","张三");
        map.put("lisi","李四");
        System.out.println(map.get("zhangsan"));
        System.out.println(map.get("lisi"));


        for(int i =0;i<1000;i++){
            map.put("2","这就是2~"+i);
            System.out.println(map.get("2"));
        }
        System.out.println(map.size());
    }
}
